import request, { RequestDto } from './request'

export interface UploadDto {
  filename: string
  createdAt: string
  extname: string
  url: string
  __v: number
  _id: string
}

export function uploadFile(data: FormData): Promise<RequestDto<UploadDto>> {
  return request.post('/upload', data)
}
